Optimal. Leaf size=130 \[ -\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {3 i \tan ^4(c+d x)}{4 a d}+\frac {5 \tan ^3(c+d x)}{6 a d}+\frac {3 i \tan ^2(c+d x)}{2 a d}-\frac {5 \tan (c+d x)}{2 a d}+\frac {3 i \log (\cos (c+d x))}{a d}+\frac {5 x}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3550, 3528, 3525, 3475} \[ -\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {3 i \tan ^4(c+d x)}{4 a d}+\frac {5 \tan ^3(c+d x)}{6 a d}+\frac {3 i \tan ^2(c+d x)}{2 a d}-\frac {5 \tan (c+d x)}{2 a d}+\frac {3 i \log (\cos (c+d x))}{a d}+\frac {5 x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3525
Rule 3528
Rule 3550
Rubi steps
\begin {align*} \int \frac {\tan ^6(c+d x)}{a+i a \tan (c+d x)} \, dx &=-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac {\int \tan ^4(c+d x) (5 a-6 i a \tan (c+d x)) \, dx}{2 a^2}\\ &=-\frac {3 i \tan ^4(c+d x)}{4 a d}-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac {\int \tan ^3(c+d x) (6 i a+5 a \tan (c+d x)) \, dx}{2 a^2}\\ &=\frac {5 \tan ^3(c+d x)}{6 a d}-\frac {3 i \tan ^4(c+d x)}{4 a d}-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac {\int \tan ^2(c+d x) (-5 a+6 i a \tan (c+d x)) \, dx}{2 a^2}\\ &=\frac {3 i \tan ^2(c+d x)}{2 a d}+\frac {5 \tan ^3(c+d x)}{6 a d}-\frac {3 i \tan ^4(c+d x)}{4 a d}-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}+\frac {\int \tan (c+d x) (-6 i a-5 a \tan (c+d x)) \, dx}{2 a^2}\\ &=\frac {5 x}{2 a}-\frac {5 \tan (c+d x)}{2 a d}+\frac {3 i \tan ^2(c+d x)}{2 a d}+\frac {5 \tan ^3(c+d x)}{6 a d}-\frac {3 i \tan ^4(c+d x)}{4 a d}-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {(3 i) \int \tan (c+d x) \, dx}{a}\\ &=\frac {5 x}{2 a}+\frac {3 i \log (\cos (c+d x))}{a d}-\frac {5 \tan (c+d x)}{2 a d}+\frac {3 i \tan ^2(c+d x)}{2 a d}+\frac {5 \tan ^3(c+d x)}{6 a d}-\frac {3 i \tan ^4(c+d x)}{4 a d}-\frac {\tan ^5(c+d x)}{2 d (a+i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.52, size = 840, normalized size = 6.46 \[ \frac {\left (\frac {\sin (c)}{4}-\frac {1}{4} i \cos (c)\right ) (\cos (d x)+i \sin (d x)) \sec ^5(c+d x)}{d (i \tan (c+d x) a+a)}-\frac {i (\cos (d x)+i \sin (d x)) (-\cos (c-d x)+\cos (c+d x)-i \sin (c-d x)+i \sin (c+d x)) \sec ^4(c+d x)}{6 d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) (i \tan (c+d x) a+a)}+\frac {\left (\frac {1}{6} i \cos (c)-\frac {\sin (c)}{6}\right ) (9 \cos (c)-2 i \sin (c)) (\cos (d x)+i \sin (d x)) \sec ^3(c+d x)}{d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) (i \tan (c+d x) a+a)}+\frac {7 i (\cos (d x)+i \sin (d x)) (-\cos (c-d x)+\cos (c+d x)-i \sin (c-d x)+i \sin (c+d x)) \sec ^2(c+d x)}{6 d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) (i \tan (c+d x) a+a)}+\frac {5 x \cos (c) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{2 (i \tan (c+d x) a+a)}+\frac {3 \tan ^{-1}(\tan (d x)) \cos (c) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{d (i \tan (c+d x) a+a)}+\frac {3 i \cos (c) \log \left (\cos ^2(c+d x)\right ) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{2 d (i \tan (c+d x) a+a)}+\frac {\cos (2 d x) \left (-\frac {1}{4} i \cos (c)-\frac {\sin (c)}{4}\right ) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{d (i \tan (c+d x) a+a)}+\frac {5 i x \sin (c) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{2 (i \tan (c+d x) a+a)}+\frac {3 i \tan ^{-1}(\tan (d x)) \sin (c) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{d (i \tan (c+d x) a+a)}-\frac {3 \log \left (\cos ^2(c+d x)\right ) \sin (c) (\cos (d x)+i \sin (d x)) \sec (c+d x)}{2 d (i \tan (c+d x) a+a)}+\frac {\left (\frac {1}{4} i \sin (c)-\frac {\cos (c)}{4}\right ) (\cos (d x)+i \sin (d x)) \sin (2 d x) \sec (c+d x)}{d (i \tan (c+d x) a+a)}+\frac {x (\cos (d x)+i \sin (d x)) (-3 \sec (c)-i (3 \cos (c)+3 i \sin (c)) \tan (c)) \sec (c+d x)}{i \tan (c+d x) a+a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 216, normalized size = 1.66 \[ \frac {66 \, d x e^{\left (10 i \, d x + 10 i \, c\right )} + {\left (264 \, d x - 3 i\right )} e^{\left (8 i \, d x + 8 i \, c\right )} + {\left (396 \, d x - 84 i\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + {\left (264 \, d x - 98 i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + {\left (66 \, d x - 68 i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (36 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 144 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 216 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 144 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 36 i \, e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 3 i}{12 \, {\left (a d e^{\left (10 i \, d x + 10 i \, c\right )} + 4 \, a d e^{\left (8 i \, d x + 8 i \, c\right )} + 6 \, a d e^{\left (6 i \, d x + 6 i \, c\right )} + 4 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 34.60, size = 116, normalized size = 0.89 \[ -\frac {\frac {33 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac {3 i \, \log \left (i \, \tan \left (d x + c\right ) - 1\right )}{a} + \frac {3 \, {\left (-11 i \, \tan \left (d x + c\right ) - 9\right )}}{a {\left (\tan \left (d x + c\right ) - i\right )}} + \frac {3 i \, a^{3} \tan \left (d x + c\right )^{4} - 4 \, a^{3} \tan \left (d x + c\right )^{3} - 12 i \, a^{3} \tan \left (d x + c\right )^{2} + 24 \, a^{3} \tan \left (d x + c\right )}{a^{4}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.15, size = 123, normalized size = 0.95 \[ -\frac {2 \tan \left (d x +c \right )}{d a}-\frac {i \left (\tan ^{4}\left (d x +c \right )\right )}{4 d a}+\frac {\tan ^{3}\left (d x +c \right )}{3 d a}+\frac {i \left (\tan ^{2}\left (d x +c \right )\right )}{d a}-\frac {i \ln \left (\tan \left (d x +c \right )+i\right )}{4 d a}-\frac {11 i \ln \left (\tan \left (d x +c \right )-i\right )}{4 d a}-\frac {1}{2 d a \left (\tan \left (d x +c \right )-i\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.07, size = 125, normalized size = 0.96 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,a\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,a\,d}-\frac {2\,\mathrm {tan}\left (c+d\,x\right )}{a\,d}-\frac {1{}\mathrm {i}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{a\,d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,11{}\mathrm {i}}{4\,a\,d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,1{}\mathrm {i}}{4\,a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.61, size = 221, normalized size = 1.70 \[ \frac {18 i e^{4 i c} e^{4 i d x} + 20 i e^{2 i c} e^{2 i d x} + 14 i}{- 3 a d e^{8 i c} e^{8 i d x} - 12 a d e^{6 i c} e^{6 i d x} - 18 a d e^{4 i c} e^{4 i d x} - 12 a d e^{2 i c} e^{2 i d x} - 3 a d} + \begin {cases} - \frac {i e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text {for}\: 4 a d e^{2 i c} \neq 0 \\x \left (\frac {\left (11 e^{2 i c} - 1\right ) e^{- 2 i c}}{2 a} - \frac {11}{2 a}\right ) & \text {otherwise} \end {cases} + \frac {11 x}{2 a} + \frac {3 i \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________